﻿<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:controls="clr-namespace:Reporter.Controls" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:data="clr-namespace:Reporter.Data" 
        mc:Ignorable="d"
	    x:Class="Reporter.Controls.ImportProvisionNotebookDialogBox"
	    x:Name="Window"
	    Title="Importing Provision Notebook ..." 
        Height="260" 
        ResizeMode="NoResize"	        
        ShowInTaskbar="False"
        WindowStartupLocation="CenterOwner" 
        xmlns:local="clr-namespace:Reporter.Controls" 
        Background="{x:Null}" WindowStyle="None" AllowsTransparency="True" Width="450" >
    <Window.Resources>

        <controls:ImportInfo x:Key="ImportInfoDataSource" DataImported="False" DataInitialized="True" ImagesImported="{x:Null}" NotebookInitialized="False" EllapsedTime="00:00:00"  d:IsDataSource="True" />
      
        <Storyboard x:Key="ZoomIn">
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="LayoutRoot">
        		<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
        	</DoubleAnimationUsingKeyFrames>
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="LayoutRoot">
        		<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
        	</DoubleAnimationUsingKeyFrames>
        </Storyboard>
        
        <Storyboard x:Key="ZoomOut">
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="LayoutRoot">
        		<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
        	</DoubleAnimationUsingKeyFrames>
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="LayoutRoot">
        		<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
        		<SplineDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
        	</DoubleAnimationUsingKeyFrames>
        </Storyboard>
        
    </Window.Resources>
	<Window.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded"/>
		<EventTrigger RoutedEvent="FrameworkElement.Unloaded"/>
	</Window.Triggers>
    <Grid x:Name="LayoutRoot"  DataContext="{Binding Source={StaticResource ImportInfoDataSource}}" RenderTransformOrigin="0.5,0.5">
    	<Grid.RenderTransform>
    		<TransformGroup>
    			<ScaleTransform/>
    			<SkewTransform/>
    			<RotateTransform/>
    			<TranslateTransform/>
    		</TransformGroup>
    	</Grid.RenderTransform>
    	<Border Background="{DynamicResource TextBrush}" CornerRadius="10" Style="{DynamicResource ApplicationOuterPanelBorderStyle}">
    					<Border.Effect>
				<DropShadowEffect Opacity="0.6" ShadowDepth="3" BlurRadius="10" Direction="320"/>
			</Border.Effect>
			<Border Background="{DynamicResource ApplicationPanelBackgroundBrush}" Style="{DynamicResource ApplicationPanelBorderStyle}">
    			<Grid Margin="5">
    				<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="0,4,5,0" HorizontalAlignment="Right">
    					<TextBlock Text="Ellapsed time : " Foreground="{DynamicResource FormLabelBrush}" d:LayoutOverrides="Width" VerticalAlignment="Center" Style="{DynamicResource FormLabelStyle}" />
    					<TextBlock x:Name="CollapsedTime_tb" Text="{Binding EllapsedTime}" Foreground="{DynamicResource FormLabelBrush}" VerticalAlignment="Center" Style="{DynamicResource FormLabelStyle}" FontWeight="Bold" />
    				</StackPanel>
    				<Border Background="{DynamicResource ControlBackgroundLightOpaqueBrush}" BorderBrush="{DynamicResource ApplicationPanelBackgroundBrush}" Style="{DynamicResource ApplicationInnerPanelBorderStyle}" Margin="0,30,0,0" >
    					<Grid Margin="5,0">
    						<StackPanel Orientation="Vertical" VerticalAlignment="Center" Margin="7,0,0,0">
    							<CheckBox x:Name="initializeData_chb" Content="Initializing data" d:LayoutOverrides="Width" VerticalAlignment="Center" IsChecked="{Binding DataInitialized}" IsThreeState="True" Style="{DynamicResource ImportThreeStateCheckBoxStyle}" />
    							<CheckBox x:Name="initializeNotebook_chb" Content="Initializing Provision notebook" d:LayoutOverrides="Width" VerticalAlignment="Center" IsChecked="{Binding NotebookInitialized}" IsThreeState="True" Style="{DynamicResource ImportThreeStateCheckBoxStyle}"/>
    							<CheckBox x:Name="importData_chb" Content="Importing data" VerticalAlignment="Center" IsChecked="{Binding DataImported}" d:LayoutOverrides="Width" IsThreeState="True" Style="{DynamicResource ImportThreeStateCheckBoxStyle}"/>
    							<CheckBox x:Name="importImages_chb" Content="Importing images" VerticalAlignment="Center" IsChecked="{Binding ImagesImported}" d:LayoutOverrides="Width" IsThreeState="True" Style="{DynamicResource ImportThreeStateCheckBoxStyle}"/>
    						</StackPanel>
    						<TextBlock x:Name="importProgressText" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Import process may take several minutes, please wait ..." Style="{DynamicResource FormLabelStyle}" FontSize="{DynamicResource FormLabelLargeFontSize}" Foreground="LightGoldenrodYellow" Margin="5,5,0,0" VerticalAlignment="Top"/>
                            <TextBlock x:Name="importFinishedText" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Import process successfully completed." Style="{DynamicResource FormLabelStyle}" FontSize="{DynamicResource FormLabelLargeFontSize}" Foreground="{DynamicResource InfoMsgBrush}" Margin="5,5,0,0" VerticalAlignment="Top" Visibility="Collapsed"/>
    					</Grid>
    				</Border>
    				<Button x:Name="OKButton" Click="OkBtClick" Content="Done" Padding="5" Height="25" Margin="0,0,5,10" Width="50" IsEnabled="False" HorizontalAlignment="Right" VerticalAlignment="Bottom" d:LayoutOverrides="HorizontalMargin"/>
    				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Importing Provision Notebook ..." VerticalAlignment="Top" Foreground="{DynamicResource TextBrush}" FontSize="16" d:LayoutOverrides="VerticalAlignment" Style="{DynamicResource FormLabelStyle}"/>
                </Grid>
       
    		</Border>
       
    	</Border>
       
    </Grid>
</Window>